﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MensUnoShop.Models.ViewModels.OrderViewModel>" %>
<%@ Import Namespace="MensUnoShop.Helpers" %>
<%@ Import Namespace="MensUnoShop.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	men'suno SHOP
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%
    var ismaga = false;
    if (Model.OD.MLIST.Any(m => m.TYPE == Config.MarketType.Mangazine))
        ismaga = true;
%>
<div class="CART_CONTENT">
<img src="/Content/page_img/cart_content_top.gif" />
<div class="CART_TITLE">
<h1>購物車</h1>
<span class="CART_BT_FAVORITE"><a href="/member/my_favorite">最愛商品清單</a></span>
<br class="CLEAR" />
</div>
<div class="CART_FORM">
  <table width="850" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td width="114"><div align="center"></div></td>
      <td width="97"><div align="center"></div></td>
      <td width="394"><div align="left">商品<br />
        Item </div></td>
      <td width="62"><div align="center"><%if(ismaga){ %>期數<br />issues<%}else{ %>顏色<br />Color<%} %></div></td>
      <td width="62"><div align="center"> 單價<br />
        Price </div></td>
      <td width="53"><div align="center"> 數量<br />
        Quantity
      </div></td>
      <td width="130"><div align="center">金額小計<br />
        Total price</div></td>
    </tr>

   <% foreach (var sc in Model.OD.MLIST.Where(m => m.TYPE != Config.MarketType.Combo))
      {%>
  <tr>
    <td><div align="center"></div></td>
    <td><div align="center"><img src="<%:sc.IMG %>" width="75" height="75" /></div></td>
    <td valign="top"><%:sc.SN %><br /><%:sc.TITLE %><br />
      <span class="PRODUCT3_HOT_POINT"><%:sc.DISCOUNTNOTE %></span></td>
    <td><div align="center"><%:sc.COLOR %></div></td>
    <td><div align="center">NT$<%:sc.SINGLEPRICE %></div></td>
    <td><div align="center"><%:sc.AMOUNT%></div></td>
    <td><div align="center">NT$<%:sc.PRICE %></div></td>
    <td><div align="center"></div></td>
  </tr>
  <%} %>
  <% foreach(var sc in Model.OD.MLIST.Where(m=>m.TYPE==Config.MarketType.Combo).GroupBy(m=>m.COMBOID)){
         int i = 0;
         int pices = sc.Count();
         int divv = pices / sc.FirstOrDefault(s => s.AMOUNT > 0).AMOUNT;
         foreach (var s in sc)
         {
             string cs = string.Empty;
             string cs1 = string.Empty;
             string single = string.Empty;
             string amount = string.Empty;
             string total = string.Empty;

             if (i != sc.Count() - 1)
             {
                 cs = "style=\"border-bottom:none;\"";
                 cs1 = "style=\"border-bottom:none;\"";
             }
             if ((i + 1) % divv == 0)
             {
                 cs = "style=\"border-bottom:none;\"";
                 cs1 = string.Empty;
             }
             
             if (i == 0)
             {
                 single = "NT$"+s.SINGLEPRICE.ToString();
                 amount = s.AMOUNT.ToString();
                 total = "NT$"+s.PRICE.ToString();
             }
             else
             {
                 single = string.Empty;
                 amount = string.Empty;
                 total = string.Empty;
             }
  %>
  <tr>
    <td <%=cs %>><div align="center"></div>
    </td>
    <td <%=cs1 %>><div align="center"><img src="<%:s.IMG %>" width="75" height="75" /></div></td>
    <td <%=cs1 %> valign="top"><%:s.SN%><br /><%:s.TITLE%><br />
      <span class="PRODUCT3_HOT_POINT"><%:s.DISCOUNTNOTE%></span></td>
    <td <%=cs1 %>><div align="center"><%:s.COLOR%></div></td>
    <td <%=cs %>><div align="center"><%:single%></div></td>
    <td <%=cs %>><div align="center"><%:amount%></div></td>
    <td <%=cs %>><div align="center"><%:total%></div></td>
    <td <%=cs %>><div align="center"></div></td>
  </tr>
  <%
             i++;
         }
     } %>

  <%foreach (var d in Model.OD.DSKLIST.Where(d => d.SKTYPE != MensUnoShop.Models.Config.OrderDiscountType.BirthDiscount &&
                                                                                    d.SKTYPE != MensUnoShop.Models.Config.OrderDiscountType.CouponDiscount))
    { %>
  <tr>
    <td colspan="6"><div align="left" class="FONT_GREEN"><%:d.TITLE %></div></td>
    <td width="120"><div align="center" class="FONT_GREEN">- NT$<%:d.DEPRICE%></div></td>
  </tr>
  <%} %>
    <%if (Model.OD.MLIST[0].TYPE != MensUnoShop.Models.Config.MarketType.Mangazine)
      { %>
    <%bool IsBirth = (bool)ViewData["IsBirth"]; bool HasBirth = (bool)ViewData["HasBirth"];
      MensUnoShop.Models.ITradeInDiscount id = Model.OD.DSKLIST.SingleOrDefault(od => (od.SKTYPE == MensUnoShop.Models.Config.OrderDiscountType.BirthDiscount ||
                                                                                    od.SKTYPE == MensUnoShop.Models.Config.OrderDiscountType.CouponDiscount) &&
                                                                                    od.DEPRICE > 0);
      %>
      <%=Html.GetBirthOrCoupon(IsBirth, HasBirth, Model.SCCK, id, Model.OD.TOTALPRICE)%>
      <%} %>
  <tr>
      <td colspan="6">
      <%if (!ismaga)
        { %>
      <form action="" method="post"><input type="hidden" name="scck" value="<%:Model.SCCK %>" /><input type="hidden" name="utype" value="selarea" />
      選擇地區寄送Area ：
        <select name="shippingarea" id="shippingarea" onchange="this.form.submit();">
          <option value="0" <%if(Model.OD.SHIPPINGWAY==0) {%>selected<%} %>>台灣地區免運費Taiwan(郵局掛號、存局候領、超商取貨)</option>         
          <option value="1" <%if(Model.OD.SHIPPINGWAY==1) {%>selected<%} %>>亞洲地區Asia(EMS國際快捷)</option>
          <option value="2" <%if(Model.OD.SHIPPINGWAY==2) {%>selected<%} %>>美洲、歐洲地區America &amp; Europe(EMS國際快捷)</option>
          <option value="3" <%if(Model.OD.SHIPPINGWAY==3) {%>selected<%} %>>中美洲、非洲Central America &amp; Africa(EMS國際快捷)</option>
        </select></form>
      <%}else{ %>
        寄送地區僅限台灣及離島地區，海外購買請洽客服：886-2-27316690 ext.105或電郵至<a href="hung@chicgroup.com.tw">hung@chicgroup.com.tw</a>
      <%} %>
      </td>
      <td><div align="center">NT$<%:Model.OD.DELIVERYCOST %></div></td>
    </tr>
    </table>
  <table width="850" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td bgcolor="#CCCCCC">&nbsp;</td>
    <td bgcolor="#CCCCCC"><div align="right"><span class="FORM_TOTAL2">總計金額Total</span></div></td>
    <td width="120" bgcolor="#CCCCCC"><div align="left" class="FORM_TOTAL2">NT$<%:Model.OD.PAYPRICE %></div></td>
  </tr>
</table>
    <div class="BUYER_INFO"><form action="/order/f3/<%:Model.OD.SCGUID %>" method="post" onsubmit="return checkFrom();"><input type="hidden" name="scck" value="<%:Model.SCCK %>" />
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="14%" class="FONT_GREEN"><div align="right"> <span class="MEMBER_TITLE1_POINT2">＊</span>商品寄送資訊<br />
            Receiver</div></td>
          <td width="86%"><input type="checkbox" name="same" id="same" onclick="showMemberData();" />
              <span class="FONT_LIGHTGREEN">資料同上方之會員資料</span></td>
        </tr>
        <tr>
          <td><div align="right">＊姓名：</div></td>
          <td>      姓Last name
            <input name="lastname" type="text" class="MEMBER_BOX" id="lastname" size="10" value="" />
            名First name
            <input name="firstname" type="text" class="MEMBER_BOX" id="firstname" size="10" value="" />
            <input name="sex" id="man" type="radio" value="0"  />
            男Male　
            <input name="sex" type="radio" id="female" value="1" />
            女Female
            </td>
        </tr>
        <tr>
          <td><div align="right">＊電話Tel：</div></td>
          <td><input name="tel" id="tel" type="text"  size="20" value="" /></td>
        </tr>
        <tr>
          <td><div align="right">＊地址Location：</div></td>
          <td>國家Country：
            <select name="country" id="country">
                <option value="Australia">Australia</option>
                <option value="Belgium">Belgium</option>
                <option value="Canada">Canada</option>
                <option value="France">France</option>
                <option value="Germany">Germany</option>
                <option value="Italy">Italy</option>
                <option value="Japan">Japan</option>
                <option value="Korea">Korea</option>
                <option value="Macao">Macao</option>
                <option value="Malaysia">Malaysia</option>
                <option value="Netherlands">Netherlands</option>
                <option value="Singapore">Singapore</option>
                <option value="Spain">Spain</option>
                <option value="Switzerland">Switzerland</option>
                <option selected="selected" value="Taiwan">Taiwan</option>
                <option value="Thailand">Thailand</option>
                <option value="UnitedKingdom">UnitedKingdom</option>
                <option value="UnitedStates">UnitedStates</option>
                <option value="Afghanistan">Afghanistan</option>
                <option value="Albania">Albania</option>
                <option value="Algeria">Algeria</option>
                <option value="American">American</option>
                <option value="Samoa">Samoa</option>
                <option value="Andorra">Andorra</option>
                <option value="Angola">Angola</option>
                <option value="Anguilla">Anguilla</option>
                <option value="Antarctica">Antarctica</option>
                <option value="AntiguaandBarbuda">AntiguaandBarbuda</option>
                <option value="Argentina">Argentina</option>
                <option value="Armenia">Armenia</option>
                <option value="Aruba">Aruba</option>
                <option value="Austria">Austria</option>
                <option value="Azerbaidjan">Azerbaidjan</option>
                <option value="Bahamas">Bahamas</option>
                <option value="Bahrain">Bahrain</option>
                <option value="Bangladesh">Bangladesh</option>
                <option value="Barbados">Barbados</option>
                <option value="Belarus">Belarus</option>
                <option value="Belize">Belize</option>
                <option value="Benin">Benin</option>
                <option value="Bermuda">Bermuda</option>
                <option value="Bhutan">Bhutan</option>
                <option value="Bolivia">Bolivia</option>
                <option value="BosniaandHerzegovina">BosniaandHerzegovina</option>
                <option value="Botswana">Botswana</option>
                <option value="BouvetIsland">BouvetIsland</option>
                <option value="Brazil">Brazil</option>
                <option value="BritishIndianOceanT-tory">BritishIndianOceanT-tory</option>
                <option value="Brunei">Brunei</option>
                <option value="Bulgaria">Bulgaria</option>
                <option value="BurkinaFaso">BurkinaFaso</option>
                <option value="Burundi">Burundi</option>
                <option value="Cambodia">Cambodia</option>
                <option value="Cameroon">Cameroon</option>
                <option value="CapeVerde">CapeVerde</option>
                <option value="CaymanIslands">CaymanIslands</option>
                <option value="CentralAfricanRepublic">CentralAfricanRepublic</option>
                <option value="Chad">Chad</option>
                <option value="Chile">Chile</option>
                <option value="China">China</option>
                <option value="ChristmasIsland">ChristmasIsland</option>
                <option value="Cocos(Keeling)Islands">Cocos(Keeling)Islands</option>
                <option value="Colombia">Colombia</option>
                <option value="Comoros">Comoros</option>
                <option value="CookIslands">CookIslands</option>
                <option value="CostaRica">CostaRica</option>
                <option value="CoteD'Ivoire">CoteD'Ivoire</option>
                <option value="Croatia">Croatia</option>
                <option value="Cuba">Cuba</option>
                <option value="Cyprus">Cyprus</option>
                <option value="CzechRepublic">CzechRepublic</option>
                <option value="Denmark">Denmark</option>
                <option value="Djibouti">Djibouti</option>
                <option value="Dominica">Dominica</option>
                <option value="DominicanRepublic">DominicanRepublic</option>
                <option value="EastTimor">EastTimor</option>
                <option value="Ecuador">Ecuador</option>
                <option value="Egypt">Egypt</option>
                <option value="ElSalvador">ElSalvador</option>
                <option value="EquatorialGuinea">EquatorialGuinea</option>
                <option value="Eritrea">Eritrea</option>
                <option value="Estonia">Estonia</option>
                <option value="Ethiopia">Ethiopia</option>
                <option value="FalklandIslands">FalklandIslands</option>
                <option value="FaroeIslands">FaroeIslands</option>
                <option value="Fiji">Fiji</option>
                <option value="Finland">Finland</option>
                <option value="FrenchGuiana">FrenchGuiana</option>
                <option value="FrenchPolynesia">FrenchPolynesia</option>
                <option value="Gabon">Gabon</option>
                <option value="Gambia">Gambia</option>
                <option value="Georgia">Georgia</option>
                <option value="Ghana">Ghana</option>
                <option value="Gibraltar">Gibraltar</option>
                <option value="Greece">Greece</option>
                <option value="Greenland">Greenland</option>
                <option value="Grenada">Grenada</option>
                <option value="Guadeloupe">Guadeloupe</option>
                <option value="Guam">Guam</option>
                <option value="Guatemala">Guatemala</option>
                <option value="Guinea">Guinea</option>
                <option value="Guinea-Bissau">Guinea-Bissau</option>
                <option value="Guyana">Guyana</option>
                <option value="Haiti">Haiti</option>
                <option value="HeardIs.andMcDonaldIs.">HeardIs.andMcDonaldIs.</option>
                <option value="HolySee(VaticanCityState)">HolySee(VaticanCityState)</option>
                <option value="Honduras">Honduras</option>
                <option value="HongKong">HongKong</option>
                <option value="Hungary">Hungary</option>
                <option value="Iceland">Iceland</option>
                <option value="India">India</option>
                <option value="Indonesia">Indonesia</option>
                <option value="Iran">Iran</option>
                <option value="Iraq">Iraq</option>
                <option value="Ireland">Ireland</option>
                <option value="Israel">Israel</option>
                <option value="Jamaica">Jamaica</option>
                <option value="Jordan">Jordan</option>
                <option value="Kazakstan">Kazakstan</option>
                <option value="Kenya">Kenya</option>
                <option value="Kiribati">Kiribati</option>
                <option value="Korea,North">Korea,North</option>
                <option value="Korea,South">Korea,South</option>
                <option value="Kuwait">Kuwait</option>
                <option value="Kyrgyzstan">Kyrgyzstan</option>
                <option value="Lao">Lao</option>
                <option value="Latvia">Latvia</option>
                <option value="Lebanon">Lebanon</option>
                <option value="Lesotho">Lesotho</option>
                <option value="Liberia">Liberia</option>
                <option value="Libya">Libya</option>
                <option value="Liechtenstein">Liechtenstein</option>
                <option value="Lithuania">Lithuania</option>
                <option value="Luxembourg">Luxembourg</option>
                <option value="Macedonia">Macedonia</option>
                <option value="Madagascar">Madagascar</option>
                <option value="Malawi">Malawi</option>
                <option value="Maldives">Maldives</option>
                <option value="MaliMalta">MaliMalta</option>
                <option value="MarshallIslands">MarshallIslands</option>
                <option value="Martinique">Martinique</option>
                <option value="Mauritania">Mauritania</option>
                <option value="Mauritius">Mauritius</option>
                <option value="Mayotte">Mayotte</option>
                <option value="Mexico">Mexico</option>
                <option value="Micronesia">Micronesia</option>
                <option value="Moldova">Moldova</option>
                <option value="Monaco">Monaco</option>
                <option value="Mongolia">Mongolia</option>
                <option value="Montserrat">Montserrat</option>
                <option value="Morocco">Morocco</option>
                <option value="Mozambique">Mozambique</option>
                <option value="Myanmar">Myanmar</option>
                <option value="Namibia">Namibia</option>
                <option value="Nauru">Nauru</option>
                <option value="Nepal">Nepal</option>
                <option value="NetherlandsAntilles">NetherlandsAntilles</option>
                <option value="NewCaledonia">NewCaledonia</option>
                <option value="NewZealand">NewZealand</option>
                <option value="Nicaragua">Nicaragua</option>
                <option value="Niger">Niger</option>
                <option value="Nigeria">Nigeria</option>
                <option value="Niue">Niue</option>
                <option value="Norfolk">Norfolk</option>
                <option value="NorthernMarianaIslands">NorthernMarianaIslands</option>
                <option value="Norway">Norway</option>
                <option value="Oman">Oman</option>
                <option value="Pakistan">Pakistan</option>
                <option value="Palau">Palau</option>
                <option value="PalestinianState(Proposed)">PalestinianState(Proposed)</option>
                <option value="Panama">Panama</option>
                <option value="PapuaNewGuinea">PapuaNewGuinea</option>
                <option value="Paraguay">Paraguay</option>
                <option value="Peru">Peru</option>
                <option value="Philippines">Philippines</option>
                <option value="PitcairnIsland">PitcairnIsland</option>
                <option value="PolandPortugal">PolandPortugal</option>
                <option value="Qatar">Qatar</option>
                <option value="RepublicofCongo">RepublicofCongo</option>
                <option value="Reunion">Reunion</option>
                <option value="Romania">Romania</option>
                <option value="RussianFederation">RussianFederation</option>
                <option value="Rwanda">Rwanda</option>
                <option value="S.GeorgiaandS.SandwichIs.">S.GeorgiaandS.SandwichIs.</option>
                <option value="SaintHelena">SaintHelena</option>
                <option value="SaintKittsandNevis">SaintKittsandNevis</option>
                <option value="SaintLucia">SaintLucia</option>
                <option value="SaintPierreandMiquelon">SaintPierreandMiquelon</option>
                <option value="Samoa">Samoa</option>
                <option value="SanMarino">SanMarino</option>
                <option value="SaoTomeandPrincipe">SaoTomeandPrincipe</option>
                <option value="SaudiArabia">SaudiArabia</option>
                <option value="Senegal">Senegal</option>
                <option value="SerbiaandMontenegro">SerbiaandMontenegro</option>
                <option value="Seychelles">Seychelles</option>
                <option value="SierraLeone">SierraLeone</option>
                <option value="Singapore">Singapore</option>
                <option value="Slovakia">Slovakia</option>
                <option value="Slovenia">Slovenia</option>
                <option value="SolomonIslands">SolomonIslands</option>
                <option value="Somalia">Somalia</option>
                <option value="SouthAfrica">SouthAfrica</option>
                <option value="SriLanka">SriLanka</option>
                <option value="StVincentandtheGrenadines">StVincentandtheGrenadines</option>
                <option value="Sudan">Sudan</option>
                <option value="Suriname">Suriname</option>
                <option value="Svalbard">Svalbard</option>
                <option value="Swaziland">Swaziland</option>
                <option value="Sweden">Sweden</option>
                <option value="Syria">Syria</option>
                <option value="Tajikistan">Tajikistan</option>
                <option value="Tanzania">Tanzania</option>
                <option value="Thailand">Thailand</option>
                <option value="Togo">Togo</option>
                <option value="Tokelau">Tokelau</option>
                <option value="Tonga">Tonga</option>
                <option value="TrinidadandTobago">TrinidadandTobago</option>
                <option value="TromelinIsland">TromelinIsland</option>
                <option value="Tunisia">Tunisia</option>
                <option value="Turkey">Turkey</option>
                <option value="Turkmenistan">Turkmenistan</option>
                <option value="TurksandCaicosIslands">TurksandCaicosIslands</option>
                <option value="Tuvalu">Tuvalu</option>
                <option value="Uganda">Uganda</option>
                <option value="Ukraine">Ukraine</option>
                <option value="UnitedArabEmirates">UnitedArabEmirates</option>
                <option value="UruguayUSMinorOutlyingIslands">UruguayUSMinorOutlyingIslands</option>
                <option value="Uzbekistan">Uzbekistan</option>
                <option value="Vanuatu">Vanuatu</option>
                <option value="Venezuela">Venezuela</option>
                <option value="Vietnam">Vietnam</option>
                <option value="VirginIslands(BritishVirginIslands)">VirginIslands(BritishVirginIslands)</option>
                <option value="UnitedStatesWallisandFutunaIslands">UnitedStatesWallisandFutunaIslands</option>
                <option value="WesternSahara">WesternSahara</option>
                <option value="Yemen">Yemen</option>
                <option value="Yugoslavia">Yugoslavia</option>
                <option value="Zaire">Zaire</option>
                <option value="Zambia">Zambia</option>
                <option value="Zimbabwe">Zimbabwe</option>
                <option value="others">others</option>
              </select>
            <br /></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>郵遞區號Zipcode：
            <input name="zip" type="text" id="zip" maxlength="6" size="10" class="MEMBER_BOX" value="" />
            <font face="新細明體">縣市/地區City ：</font>
            <input name="city" type="text" maxlength="15" id="city" style="width:112px;" class="MEMBER_BOX" value="" />
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td><font face="新細明體">鄉/鎮/市/行政區County：</font>
              <input name="area" type="text" maxlength="15" id="area" style="width:112px;" " class="MEMBER_BOX" value="" />
              <font face="新細明體">地址Add：</font>
              <input name="address" type="text" id="address"  maxlength="150" size="38" class="MEMBER_BOX"  value=""/></td>
        </tr>
        <tr>
          <td valign="top"><div align="right" class="FONT_GREEN">客戶意見欄<br />
            Customer  opinion</div></td>
          <td><textarea name="customer" cols="60" rows="5"></textarea></td>
        </tr>
        <tr>
          <td valign="top"><div align="right">發票格式：</div></td>
          <td><input type="radio" name="ivtype" value="0" onclick="ivselect(0)" checked />
            二聯式　
            <input type="radio" name="ivtype" value="1" onclick="ivselect(1)" />
            三聯式　<span class="ivthree" style="display:none">抬頭
            <input name="ivtitle" type="text" class="MEMBER_BOX" id="ivtitle" />　
            統一編號            
            <input name="ivserial" type="text" class="MEMBER_BOX" id="ivserial" /></span></td>
            <script type="text/javascript">
                function ivselect(tp) {
                    if (tp == 0)
                        $(".ivthree").hide();
                    else
                        $(".ivthree").show();
                }
            </script>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td><div align="right">
          <%if (!ismaga)
            { %>
                <input type="button" name="button" value="回返購物車 Shopping Cart" onclick="location.href='/market/c'"/>
              <%}
            else
            { %>
                <input type="button" name="button" value="回上一頁 Back" onclick="location.href='/market/maga/<%=Model.OD.MLIST.Select(m=>m.SN).FirstOrDefault().Split('-')[0]%>'"/>
              <%} %>　<input type="submit" value="送出訂單 Send"/>　
          </div></td>
        </tr>
      </table>
      </form>
    </div>
    <%Html.RenderPartial("/Views/Shared/ReturnText.ascx", ismaga); %>

    </div><br class="CLEAR" />
<img src="/Content/page_img/cart_content_bottom.gif" /></div>
<script type="text/javascript">
    function checkFrom() {
        var k = false;
        if ($('#lastname').val() == '')
            alert('請輸入姓名!');
        else if ($('#firstname').val() == '')
            alert('請輸入姓名!');
        else if ($('#tel').val() == '')
            alert('請輸入電話!');
        else if ($('#zip').val() == '')
            alert('請輸入郵遞區號!');
        else if ($('city').val() == '')
            alert('請輸入縣市!');
        else if ($('#area').val() == '')
            alert('請輸入行政區!');
        else if ($('#address').val() == '')
            alert('請輸入地址!');
        else
            k = true;
        return k;
    }
    
    <%if (!string.IsNullOrEmpty((string)ViewData["alert"])) {%>$(".couponnote").html("<%=(string)ViewData["alert"]%>"); <% } %>
    function showMemberData()
    {
        if($("#same").attr("checked")=="checked"){
            $("#lastname").val("<%:Model.MEMBER.LASTNAME %>");
            $("#firstname").val("<%:Model.MEMBER.FIRSTNAME %>");
            $("#tel").val("<%:Model.MEMBER.MOBILE %>");
            $("#zip").val("<%:Model.MEMBER.ZIP%>");
            $("#city").val("<%:Model.MEMBER.CITY%>");
            $("#area").val("<%:Model.MEMBER.AREA %>");
            $("#address").val("<%:Model.MEMBER.ADDRESS %>");
            if("<%:Model.MEMBER.SEX%>"=="true")
                $("#female").attr("checked","checked");
            else
                $("#man").attr("checked","checked");
        }
        else{
            $("#lastname").val("");
            $("#firstname").val("");
            $("#tel").val("");
            $("#zip").val("");
            $("#city").val("");
            $("#area").val("");
            $("#address").val("");
        }
    }
    </script>
</asp:Content>
